package com.atlin.project.service;


import com.atlin.project.model.domain.Notification;
import com.atlin.project.model.dto.notification.NotificationQueryRequest;
import com.atlin.project.model.vo.NotificationSdkVO;
import com.atlin.project.model.vo.NotificationVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author atlin
 * @description 针对表【notification(通知信息表)】的数据库操作Service
 * @createDate 2024-06-06 22:28:42
 */
public interface NotificationService extends IService<Notification> {

    /**
     * 校验
     *
     * @param notification 校验数据
     * @param add          是否为添加
     */
    void validNotification(Notification notification, List<String> domainList, boolean add);

    /**
     * 获取封装
     *
     * @param notification
     * @param request
     * @return
     */
    NotificationVO getNotificationVO(Notification notification, HttpServletRequest request);

    /**
     * 获取sdk封装
     *
     * @param notification
     * @return
     */
    NotificationSdkVO getNotificationSdkVO(Notification notification);


    /**
     * 获取查询条件
     *
     * @param questionQueryRequest
     * @return
     */
    QueryWrapper<Notification> getQueryWrapper(NotificationQueryRequest questionQueryRequest);

    /**
     * 分页获取封装
     *
     * @param questionPage
     * @param request
     * @return
     */
    Page<NotificationVO> getNotificationVOPage(Page<Notification> questionPage, HttpServletRequest request);
}
